#include <bits/stdc++.h>
using namespace std;
int n, k;
struct l{
	int li, di;
	bool operator <(const l &t)const{
		return li < t.li;
	}
}a[10010];
int main()
{
	cin >> n >> k;
	for(int i = 1; i <= n; i++){
		cin >> a[i].li;
		a[i].di = i;
	}
	sort(a + 1, a + 1 + n);
	cout << a[k].di << endl;
	return 0;
}
/*
5 3
25 9 90 57 3
*/